package com.xinghou.platform.dao.main;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.xinghou.platform.model.main.VisitTo;

public interface VisitToDAO {
	
	 public VisitTo getVisitToById(Integer Id)throws DataAccessException;
	 
	 public int updateVisitTo(VisitTo visitTo) throws DataAccessException;
		
	 public int saveVisitTo(VisitTo visitTo) throws DataAccessException;
	 
	 /**
	  *  查询来访Users
	  * @param toUserId
	  * @param time		最小时间
	  * @param pageNum	行数
	  * @return
	  */
	 public List<VisitTo> getVisitToByToUserId(Integer toUserId,Long time,int rowNum);
	 
	 /**
	  *  查询来访Users(不重复头像)
	  * @param toUserId
	  * @param time		最小时间
	  * @param pageNum	行数
	  * @return
	  */
	 public List<VisitTo> getVisitToGroupByToUserId(Integer toUserId,Long time,int rowNum);
	 
	 /**
	  * 查询是否互相访问
	  * @param toUserId		userid
	  * @param fromUserId	访问我userid
	  * @return
	  * @throws DataAccessException
	  */
	 public VisitTo getVisitToByTowId(int toUserId,int fromUserId)throws DataAccessException;
}
